﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Table_pet.background;

namespace clock.time
{
    
        //节假日判断
        public class Holiday
        {
            /// <summary>
            /// Get 工作日对应结果为 0 True, 休息日对应结果为 1 False, 节假日对应的结果为 2 False；
            /// </summary>
            /// <param name="day">日期</param>
            /// <returns>http://tool.bitefu.net/jiari/</returns>
            /// <returns>还有另一个网站可以用</returns>
            /// <returns>http://api.goseek.cn/Tools/holiday?date=20190913</returns>
            public bool GetIsHolidaybitefu(string day)
            {
                Encoding encoding = Encoding.UTF8;
                string Json = WEB_api.Get("http://tool.bitefu.net/jiari?d=" + day + "", ref encoding);
                if (Json == "0")
                    return true;
                else
                    return false;
            }
        }
    
}
